<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2012-1-16
  Time: 11:50:08
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/inc/taglibs.jsp"%>
<script type="text/javascript" src="${path}/js/jquery.autoIMG.js"></script>
<form id="searchForm" method="post" action="${path }/admin/hotel">
	<input type="hidden" name="status" value="${param.status}"/>
	<input type="hidden" name="keywords" value="${param.keywords}" />
	<input type="hidden" name="pageNum" value="${pageTurn.page }" />
	<input type="hidden" name="numPerPage" value="${pageTurn.pageSize }" />
	<input type="hidden" name="orderField" value="" />
	<input type="hidden" name="rel" value="${rel }"/>
</form>
<form rel="searchForm" class="pageForm" onsubmit="return navTabSearch(this);" action="${path }/admin/hotel?rel=${rel}" method="post">
	<div class="searchBar">
		<table>
              <tr>
                  <td>
                      酒店名称
                  </td>
                  <td>
                       <input type="text" name="name" id="name" value="${name}">
                  </td>
                  <td>
                      地区
                  </td>
                  <td>
                      <input type="text" name="area" id="areahome" value="${area}">
                  </td>
                  <td>
                      价格>=
                  </td>
                  <td>
                       <input type="text" name="gtprice" id="gtprice" value="${gtprice}">
                  </td>
                  <td>
                      价格<=
                  </td>
                  <td>
                      <input type="text" name="ltprice" id="ltprice" value="${ltprice}">
                  </td>
                  <td>
                      <select name="up">
                          <option value="-1">全部</option>
                          <option value="1" <c:if test="${up==1}">selected</c:if> >推介</option>
                          <option value="2" <c:if test="${up==2}">selected</c:if> >置顶</option>
                      </select>
                  </td>
              </tr>
		</table>

		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
			</ul>
		</div>
	</div>
	</form>

<div class="pageContent" style="border-left:1px #B8D0D6 solid;border-right:1px #B8D0D6 solid">
	<div class="panelBar">
			<ul class="toolBar">
				<c:choose>
					<c:when test="${!empty isLookup }">
						<li><div class="button"><div class="buttonContent"><button type="button" multLookup="idarry" warn="请选择">选择带回</button></div></div></li>
					</c:when>
					<c:otherwise>
						<li><a class="add" href="${path}/admin/hotel/edit" target="dialog" rel="ticketEdit"  title="添加酒店" width="700" height="600"><span>添加</span></a></li>
						<li><a class="delete" href="${path}/admin/hotel/del?rel=${rel}" target="selectedTodo" rel="ids" title="确定删除所选记录?"><span>删除</span></a></li>
					    <li><a class="edit" href="${path}/admin/hotel/up?push=1&rel=${rel}" target="selectedTodo" rel="ids" title="确定设置为推介?"><span>推介</span></a></li>
                        <li><a class="edit" href="${path}/admin/hotel/up?top=1&rel=${rel}" target="selectedTodo" rel="ids" title="确定设置为置顶?"><span>置顶</span></a></li>
                        <li><a class="edit" href="${path}/admin/hotel/up?push=0&rel=${rel}" target="selectedTodo" rel="ids" title="确定取消推介?"><span>取消推介</span></a></li>
                        <li><a class="edit" href="${path}/admin/hotel/up?top=0&rel=${rel}" target="selectedTodo" rel="ids" title="确定取消置顶?"><span>取消置顶</span></a></li>
                    </c:otherwise>
				</c:choose>

			</ul>
	</div>
	<div layoutH="115">
		<c:forEach items="${page.result }" var="hotel">
            <div  style="width:200px;float:left;padding-right:5px;">

                <div id="pic" class="boximg" style="width:170px;height:150px;overflow:hidden;">
                    <img src="${uploadHttp}${hotel.img}"/>
                </div>
                <div>
                    <span>
					    <input type="checkbox" name="ids" id="cb${hotel.id}" value="${hotel.id}"/>
				    </span>
                    <span>
                        <a href="${path}/admin/hotel/edit?id=${hotel.id}" target="dialog" width="700" height="600">${hotel.name }</a>
                    </span>
                    <span>
                        <c:choose>
                            <c:when test="${empty hotel.areaName}">
                                 [地区未填写]
                            </c:when>
                            <c:otherwise>
                                 [${hotel.areaName }]
                            </c:otherwise>
                        </c:choose>
                    </span>
                    <c:if test="${hotel.istop==1}">
                        [<font color="red">置顶</font>]
                     </c:if>
                    <c:if test="${hotel.ispush==1}">
                        [<font color="red">推介</font>]
                    </c:if>
                    <br/>
                </div>
            </div>

		</c:forEach>
	</div>
	<div style="clear:both"></div>
	<div class="panelBar">
		<%@ include file="/inc/admin-page.jsp"%>
	</div>
</div>
<script type="text/javascript">
    $(".boximg").autoIMG();
</script>
